#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<stdio.h>
#include<stdio.h>
int main()
{
    int* p = NULL;
    int arr[10];
    p = arr;
    for (int i = 0; i < 10; i++)
    {
        scanf("%d", p);
        p++;
    }
    int max = arr[0];
    int min = arr[0];
    for (int i = 0; i < 10; i++)
    {
        if (arr[i] > max)
            max = arr[i];
        if (arr[i] < min)
            min = arr[i];
    }
    printf("difference value = %d", max - min);
    return 0;
}
int main2()
{
    int N;
    scanf("%d", &N);
    int arr[3];
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &arr[i]);
    }
    int max = arr[0];
    int min = arr[0];
    for (int j = 0; j < N; j++) {
        if (arr[j] > max)
        {
            max = arr[j];
        }
        if (arr[j] < min)
        {
            min = arr[j];
        }
    }
    printf("max = %d\nmin = %d", max, min);
    return 0;
}
int main1()
{
    char a[41];
    char b[41];
    scanf("%s", a);
    scanf("%s", b);
    char c[81];

    char* d = a;
    char* f = b;
    char* e = c;
    if (*d != '\0' && *f != '\0')
    {
        while (*d != '\0') {
            *e = *d;
            e++;
            d++;
        }
        while (*f != '\0') {
            *e = *f;
            e++;
            f++;
        }
        *e = '\0';
        printf("%s", c);
    }
    else {
        if (*d != '\0' && *f == '\0') {
            while (*d != '\0') {
                *e = *d;
                e++;
                d++;
            }
            *e = '\0';
            printf("%s", c);
        }
        else if (*d == '\0' && *f != '\0') {
            while (*f != '\0') {
                *e = *f;
                e++;
                f++;
            }
            *e = '\0';
            printf("%s", c);
        }
        else
            printf(" ");
    }
    return 0;
}